/*
 * ProgramNodeBuilder.h
 *
 *  Created on: Jan 23, 2013
 *      Author: quanpv
 */

#ifndef PROGRAMNODEBUILDER_H_
#define PROGRAMNODEBUILDER_H_

#include <boost/shared_ptr.hpp>
#include "ProgramNode.h"

class ProgramNodeBuilder {
public:
	ProgramNodeBuilder();
	virtual ~ProgramNodeBuilder();

	virtual boost::shared_ptr<ProgramNode> NewVariable(const char* variableName) const;
	virtual boost::shared_ptr<ProgramNode> NewAssignment(boost::shared_ptr<ProgramNode> variable, boost::shared_ptr<ProgramNode> expression) const;
	virtual boost::shared_ptr<ProgramNode> NewReturnStatement(boost::shared_ptr<ProgramNode> value) const;
	virtual boost::shared_ptr<ProgramNode> NewCondition(boost::shared_ptr<ProgramNode> condition, boost::shared_ptr<ProgramNode> truePart,
			boost::shared_ptr<ProgramNode> falsePart) const;
	//...
	boost::shared_ptr<ProgramNode> GetRootNode();
private:
	boost::shared_ptr<ProgramNode> _node;
};

#endif /* PROGRAMNODEBUILDER_H_ */
